#import <UIKit/UIKit.h>
#import "MapBuildingSearchView.h"
#import "BuildingCollection.h"
#import "SFUConstants.h"
#import "SFUEventSearchResponseDelegate.h"
#import "MapSearchUtility.h"

/**
 * A MapSearchListViewer is an object representing the view that 
 * displays a list of search options for the map.
 *
 * A MapBuildingSearchDelegate must be set to respond to events from
 * within the inner map building search viewer.
 *
 * A SFUEventSearchResponseDelegate must be set to respond to events
 * from within the event search viewer.
 *
 * @author      James Lin
 * @version     0.8.6
 * @since       0.8.6
 * @see         MapBuildingSearchDelegate
 * @see         SFUEventSearchResponseDelegate
 */
@interface MapSearchListViewer : UIViewController <UITableViewDelegate, UITableViewDataSource, 
													MapBuildingSearchDelegate, SFUEventSearchResponseDelegate> {
	id<MapBuildingSearchDelegate>	   bSearchDelegate;   // Delegate handling building search events
	id<SFUEventSearchResponseDelegate> eSearchDelegate;   // Delegate handling building search events
	NSArray*                           searchOptionsList; // Data source for the table of search options
	UITableView*                       searchTableView;   // Table of search options
	UINavigationController*            parentNav;         // The parent navigation controller

}

/**
 * Retrieve the shared instance of the map search list viewer.
 *
 * @return  the shared instance of MapSearchListViewer
 */
+ (MapSearchListViewer*)sharedMapSearchListViewer;

/**
 * Display the listing of search options in a new view.
 *
 * Pushes this view onto the navigation controller stack of the parent
 * view. Upon tapping the back button, the view is automatically 
 * popped off the top of the navigation stack.
 *
 * @param navController  the navigation controller of the parent view
 * @param bDelegate      the delegate handling building search events
 * @param sDelegate      the delegate handling event search events
 */
- (void)displayWithNavController:(UINavigationController*)navController
			  bldgSearchDelegate:(id<MapBuildingSearchDelegate>)bDelegate 
			 eventSearchDelegate:(id<SFUEventSearchResponseDelegate>)eDelegate;

@end
